package com.glsc.ngateway.common.base.repo.mysql.flowable;

import com.glsc.ngateway.common.base.domain.mysql.flowable.FlowableEhrDeptinfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author lium
 * @date 2022/5/9
 */
@Deprecated
public interface FlowableEhrDeptinfoRepo extends JpaRepository<FlowableEhrDeptinfo, Long>, JpaSpecificationExecutor<FlowableEhrDeptinfo> {

    @Transactional
    @Modifying
    @Query(value = "truncate table t_flowable_ehr_deptinfo", nativeQuery = true)
    Integer truncateTableEhrDept();

    List<FlowableEhrDeptinfo> findAllByDepidIn(List<Integer> depIds);
}